package com.changgou.goods.pojo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 某一款商品的公共属性
 *
 * @author gaofeng
 * @Date 2025/4/19 23:18
 */
@Data
@ApiModel(description = "Spu", value = "Spu")
@Table(name = "tb_spu")
public class Spu implements Serializable {
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    @Id
    @Column(name = "id")
    private Long id;

    /**
     * 货号
     */
    @ApiModelProperty(value = "货号")
    @Column(name = "sn")
    private String sn;

    /**
     * SPU名
     */
    @ApiModelProperty(value = "SPU名")
    @Column(name = "name")
    private String name;

    /**
     * 副标题
     */
    @ApiModelProperty(value = "副标题")
    @Column(name = "caption")
    private String caption;

    /**
     * 品牌ID
     */
    @ApiModelProperty(value = "品牌ID")
    @Column(name = "brand_id")
    private Integer brandId;

    /**
     * 一级分类
     */
    @ApiModelProperty(value = "一级分类")
    @Column(name = "category1_id")
    private Integer category1Id;

    /**
     * 二级分类
     */
    @ApiModelProperty(value = "二级分类")
    @Column(name = "category2_id")
    private Integer category2Id;

    /**
     * 三级分类
     */
    @ApiModelProperty(value = "三级分类")
    @Column(name = "category3_id")
    private Integer category3Id;

    /**
     * 模板ID
     */
    @ApiModelProperty(value = "模板ID")
    @Column(name = "template_id")
    private Integer templateId;

    /**
     * 运费模板id
     */
    @ApiModelProperty(value = "运费模板id")
    @Column(name = "freight_id")
    private Integer freightId;

    /**
     * 图片
     */
    @ApiModelProperty(value = "图片")
    @Column(name = "image")
    private String image;

    /**
     * 图片列表
     */
    @ApiModelProperty(value = "图片列表")
    @Column(name = "images")
    private String images;

    /**
     * 售后服务
     */
    @ApiModelProperty(value = "售后服务")
    @Column(name = "sale_service")
    private String saleService;

    /**
     * 介绍
     */
    @ApiModelProperty(value = "介绍")
    @Column(name = "introduction")
    private String introduction;

    /**
     * 规格列表
     */
    @ApiModelProperty(value = "规格列表")
    @Column(name = "spec_items")
    private String specItems;

    /**
     * 参数列表
     */
    @ApiModelProperty(value = "参数列表")
    @Column(name = "para_items")
    private String paraItems;

    /**
     * 销量
     */
    @ApiModelProperty(value = "销量")
    @Column(name = "sale_num")
    private Integer saleNum;

    /**
     * 评论数
     */
    @ApiModelProperty(value = "评论数")
    @Column(name = "comment_num")
    private Integer commentNum;

    /**
     * 是否上架
     */
    @ApiModelProperty(value = "是否上架")
    @Column(name = "is_marketable")
    private String isMarketable;

    /**
     * 是否启用规格
     */
    @ApiModelProperty(value = "是否启用规格")
    @Column(name = "is_enable_spec")
    private String isEnableSpec;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除")
    @Column(name = "is_delete")
    private String isDelete;

    /**
     * 审核状态
     */
    @ApiModelProperty(value = "审核状态")
    @Column(name = "status")
    private String status;
}
